local sk__leihun = fk.CreateSkill {

  name = "sk__leihun",

  tags = { Skill.Compulsory, },

}



sk__leihun:addEffect(fk.DamageInflicted, {
  name = "sk__leihun",
  anim_type = "defensive",
  frequency = Skill.Compulsory,
  events = {fk.DamageInflicted},
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(sk__leihun.name) and data.damageType == fk.ThunderDamage
  end,
  on_use = function(self, event, target, player, data)
    if player:isWounded() then
      player.room:recover({
        who = player,
        num = math.min(data.damage, player:getLostHp()),
        recoverBy = player,
        skillName = sk__leihun.name,
      })
    end
    return true
  end,
})

return sk__leihun